
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Mednafen Super Nintendo Entertainment System/Super Famicom Documentation</title>
  <link rel="stylesheet" type="text/css" media="screen, projection" href="mednafen.css">
 </head>
 <body>
  <center><h1><img alt="Mednafen" src="mednafen.png" width="696" height="204"></h1></center>
  <center><h1>Super Nintendo Entertainment System/Super Famicom Documentation</h1></center>
  <center><i>Last updated December 19, 2019<br>Valid as of 1.24.0-UNSTABLE</i></center>
 <p></p>
 <b>Table of Contents:</b>
 <ul><li><a href="#Section_intro">Introduction</a><ul></ul></li><li><a href="#Section_custom_palettes">Custom Palettes</a><ul></ul></li><li><a href="#Section_default_keys">Default Key Assignments</a><ul></ul></li><li><a href="#Settings+Reference">Settings Reference</a><ul></ul></li></ul><hr width="100%">
<h2><a name="Section_intro">Introduction</a></h2><p></p>Mednafen's primary SNES emulation module is a fork of <a href="http://byuu.org/">bsnes</a> v0.059, with(but not limited to) the following modifications:
<ul>
 <li>Cx4 Op10 fix patch</li>
 <li>blargg_libco_ppc64-5</li>
 <li>nall serializer 64-bit type bugfix backport</li>
 <li>a few minor timing/scheduler related changes</li>
 <li>Minor SuperFX emulation optimizations</li>
 <li>Minor S-SMP emulation optimizations</li>
 <li>Modified blending behavior when in hi-res modes</li>
</ul>
<p>
SPC playback is not supported, but it is supported (experimentally) by the <b><a href="snes_faust.html">snes_faust</a></b> module.
</p>
<p>
<b><font color="red">WARNING:</font></b> Saving state(and by extension rewinding and netplay) with this module's SNES emulation may break some games.
"Tales of Phantasia" is a known problematic game in this regard.
</p>
<hr width="100%">
<h2><a name="Section_custom_palettes">Custom Palettes</a></h2><p></p><p></p><table border><tr class="TableHeader"><th>Global Filename:</th><th>Description:</th></tr><tr><td>snes.pal</td><td>SNES 15-bit BGR<br><br>32768 RGB triplets</td></tr></table><hr width="100%">
<h2><a name="Section_default_keys">Default Key Assignments</a></h2><p></p>
 <p>
 <table border>
  <tr><th colspan="2">Virtual Gamepad 1</th></tr>
  <tr><th>Key:</th><th nowrap>Button:</th></tr>
  <tr><td>W</td><td>Up</td></tr>
  <tr><td>S</td><td>Down</td></tr>
  <tr><td>A</td><td>Left</td></tr>
  <tr><td>D</td><td>Right</td></tr>
  <tr><th>Key:</th><th nowrap>Button:</th></tr>
  <tr><td>Tab</td><td>Select</td></tr>
  <tr><td>Enter/Return</td><td>Start</td></tr>
  <tr><th>Key:</th><th nowrap>Button:</th></tr>
  <tr><td>Keypad 4</td><td>Y</td></tr>
  <tr><td>Keypad 2</td><td>B</td></tr>
  <tr><td>Keypad 8</td><td>X</td></tr>
  <tr><td>Keypad 6</td><td>A</td></tr>
  <tr><th>Key:</th><th nowrap>Button:</th></tr>
  <tr><td>Keypad 7</td><td>Left Shoulder</td></tr>
  <tr><td>Keypad 9</td><td>Right Shoulder</td></tr>
 </table>
 </p>

 <p>
 <table border>
  <tr><th colspan="2">Virtual Super Scope</th></tr>
  <tr><th>Key:</th><th nowrap>Button:</th></tr>
  <tr><td>Mouse Left</td><td>Trigger</td></tr>
  <tr><td>Mouse Right</td><td>Cursor</td></tr>
  <tr><td>Mouse Middle</td><td>Pause</td></tr>
  <tr><td>End</td><td>Turbo</td></tr>
  <tr><td>Space</td><td>Offscreen Shot(Simulated)</td></tr>
 </table>
 </p>


<hr width="100%">
<h2><a name="Settings+Reference">Settings Reference</a></h2><p></p><p>
<b>Caution:</b> Any settings that change emulation behavior as seen from the emulated game are shown with the setting name bolded in the table. One should be conscious of these settings if one has changed them from the default values when using network play or movies, as they can cause desychronizations if not set the same among hosts(or between the recording emulator and the playing emulator). 
</p>
<p></p><table border><tr class="TableHeader"><th>Setting:</th><th>Value Type:</th><th>Possible Values:</th><th>Default Value:</th><th>Description:</th></tr><tr class="RowA"><td class="ColA">snes.apu.resamp_quality</td><td class="ColB">integer</td><td class="ColC">0 <i>through</i> 10</td><td class="ColD">5</td><td class="ColE"><a name="snes.apu.resamp_quality">APU output resampler quality.</a><p>0 is lowest quality and latency and CPU usage, 10 is highest quality and latency and CPU usage.<br>
<br>
With a Mednafen sound output rate of about 32041Hz or higher: Quality "0" resampler has approximately 0.125ms of latency, quality "5" resampler has approximately 1.25ms of latency, and quality "10" resampler has approximately 3.99ms of latency.</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.correct_aspect</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.correct_aspect">Correct the aspect ratio.</a><p>Note that regardless of this setting's value, "512" and "256" width modes will be scaled to the same dimensions for display.</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.h_blend</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.h_blend">Enable horizontal blend(blur) filter.</a><p>Intended for use in combination with the "goat" OpenGL shader, or with bilinear interpolation or linear interpolation on the X axis enabled.</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA"><b>snes.input.port1</b></td><td class="ColB">enum</td><td class="ColC">none<br>gamepad<br>mouse</td><td class="ColD">gamepad</td><td class="ColE"><a name="snes.input.port1">Input device for Port 1/1A</a><ul><li><b>none</b> - none<br></li><br><li><b>gamepad</b> - Gamepad<br></li><br><li><b>mouse</b> - Mouse<br></li></ul></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA"><b>snes.input.port1.multitap</b></td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.input.port1.multitap">Enable multitap on SNES port 1.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA"><b>snes.input.port2</b></td><td class="ColB">enum</td><td class="ColC">none<br>gamepad<br>mouse<br>superscope</td><td class="ColD">gamepad</td><td class="ColE"><a name="snes.input.port2">Input device for Port 2/2A</a><ul><li><b>none</b> - none<br></li><br><li><b>gamepad</b> - Gamepad<br></li><br><li><b>mouse</b> - Mouse<br></li><br><li><b>superscope</b> - Super Scope<br>Monkey!</li></ul></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA"><b>snes.input.port2.multitap</b></td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.input.port2.multitap">Enable multitap on SNES port 2.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.mouse_sensitivity</td><td class="ColB">real</td><td class="ColC"> <i>through</i> </td><td class="ColD">0.50</td><td class="ColE"><a name="snes.mouse_sensitivity">Emulated mouse sensitivity.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
</table><p></p><table border><tr class="TableHeader"><th>Setting:</th><th>Value Type:</th><th>Possible Values:</th><th>Default Value:</th><th>Description:</th></tr><tr class="RowA"><td class="ColA">snes.enable</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">1</td><td class="ColE"><a name="snes.enable">Enable (automatic) usage of this module.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.forcemono</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.forcemono">Force monophonic sound output.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.scanlines</td><td class="ColB">integer</td><td class="ColC">-100 <i>through</i> 100</td><td class="ColD">0</td><td class="ColE"><a name="snes.scanlines">Enable scanlines with specified opacity.</a><p>Opacity is specified in %; IE a value of "100" will give entirely black scanlines.<br>
<br>
Negative values are the same as positive values for non-interlaced video, but for interlaced video will cause the scanlines to be overlaid over the previous(if the video.deinterlacer setting is set to "weave", the default) field's lines.</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.shader</td><td class="ColB">enum</td><td class="ColC">none<br>autoip<br>autoipsharper<br>scale2x<br>sabr<br>ipsharper<br>ipxnoty<br>ipynotx<br>ipxnotysharper<br>ipynotxsharper<br>goat</td><td class="ColD">none</td><td class="ColE"><a name="snes.shader">Enable specified OpenGL shader.</a><p>Obviously, this will only work with the OpenGL "video.driver" setting, and only on cards and OpenGL implementations that support shaders, otherwise you will get a black screen, or Mednafen may display an error message when starting up. When a shader is enabled, the "<system>.videoip" setting is ignored.</p><ul><li><b>none</b> - None/Disabled<br></li><br><li><b>autoip</b> - Auto Interpolation<br>Will automatically interpolate on each axis if the corresponding effective scaling factor is not an integer.</li><br><li><b>autoipsharper</b> - Sharper Auto Interpolation<br>Same as "autoip", but when interpolation is done, it is done in a manner that will reduce blurriness if possible.</li><br><li><b>scale2x</b> - Scale2x<br></li><br><li><b>sabr</b> - SABR v3.0<br>GPU-intensive.</li><br><li><b>ipsharper</b> - Sharper bilinear interpolation.<br></li><br><li><b>ipxnoty</b> - Linear interpolation on X axis only.<br></li><br><li><b>ipynotx</b> - Linear interpolation on Y axis only.<br></li><br><li><b>ipxnotysharper</b> - Sharper version of "ipxnoty".<br></li><br><li><b>ipynotxsharper</b> - Sharper version of "ipynotx".<br></li><br><li><b>goat</b> - Simple approximation of a color TV CRT look.<br>Intended for fullscreen modes with a vertical resolution of around 1000 to 1500 pixels.  Doesn't simulate halation and electron beam energy distribution nuances.</li></ul></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.shader.goat.fprog</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.shader.goat.fprog">Force interlaced video to be treated as progressive.</a><p>When disabled, the default, the "video.deinterlacer" setting is effectively ignored with respect to what appears on the screen.  When enabled, it may be prudent to disable the scanlines effect controlled by the *.goat.slen setting, or else the scanline effect may look objectionable.</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.shader.goat.hdiv</td><td class="ColB">real</td><td class="ColC">-2.00 <i>through</i> 2.00</td><td class="ColD">0.50</td><td class="ColE"><a name="snes.shader.goat.hdiv">Constant RGB horizontal divergence.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.shader.goat.pat</td><td class="ColB">enum</td><td class="ColC">goatron<br>borg<br>slenderman</td><td class="ColD">goatron</td><td class="ColE"><a name="snes.shader.goat.pat">Mask pattern.</a><ul><li><b>goatron</b> - Goatron<br>Brightest.</li><br><li><b>borg</b> - Borg<br>Darkest.</li><br><li><b>slenderman</b> - Slenderman<br>Spookiest?</li></ul></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.shader.goat.slen</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">1</td><td class="ColE"><a name="snes.shader.goat.slen">Enable scanlines effect.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.shader.goat.tp</td><td class="ColB">real</td><td class="ColC">0.00 <i>through</i> 1.00</td><td class="ColD">0.50</td><td class="ColE"><a name="snes.shader.goat.tp">Transparency of otherwise-opaque mask areas.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.shader.goat.vdiv</td><td class="ColB">real</td><td class="ColC">-2.00 <i>through</i> 2.00</td><td class="ColD">0.50</td><td class="ColE"><a name="snes.shader.goat.vdiv">Constant RGB vertical divergence.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.special</td><td class="ColB">enum</td><td class="ColC">none<br>hq2x<br>hq3x<br>hq4x<br>scale2x<br>scale3x<br>scale4x<br>2xsai<br>super2xsai<br>supereagle<br>nn2x<br>nn3x<br>nn4x<br>nny2x<br>nny3x<br>nny4x</td><td class="ColD">none</td><td class="ColE"><a name="snes.special">Enable specified special video scaler.</a><p>The destination rectangle is NOT altered by this setting, so if you have xscale and yscale set to "2", and try to use a 3x scaling filter like hq3x, the image is not going to look that great. The nearest-neighbor scalers are intended for use with bilinear interpolation enabled, at high resolutions(such as 1280x1024; nn2x(or nny2x) + bilinear interpolation + fullscreen stretching at this resolution looks quite nice).</p><ul><li><b>none</b> - None/Disabled<br></li><br><li><b>hq2x</b> - hq2x<br></li><br><li><b>hq3x</b> - hq3x<br></li><br><li><b>hq4x</b> - hq4x<br></li><br><li><b>scale2x</b> - scale2x<br></li><br><li><b>scale3x</b> - scale3x<br></li><br><li><b>scale4x</b> - scale4x<br></li><br><li><b>2xsai</b> - 2xSaI<br></li><br><li><b>super2xsai</b> - Super 2xSaI<br></li><br><li><b>supereagle</b> - Super Eagle<br></li><br><li><b>nn2x</b> - Nearest-neighbor 2x<br></li><br><li><b>nn3x</b> - Nearest-neighbor 3x<br></li><br><li><b>nn4x</b> - Nearest-neighbor 4x<br></li><br><li><b>nny2x</b> - Nearest-neighbor 2x, y axis only<br></li><br><li><b>nny3x</b> - Nearest-neighbor 3x, y axis only<br></li><br><li><b>nny4x</b> - Nearest-neighbor 4x, y axis only<br></li></ul></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.stretch</td><td class="ColB">enum</td><td class="ColC">0<br>full<br>aspect<br>aspect_int<br>aspect_mult2</td><td class="ColD">aspect_mult2</td><td class="ColE"><a name="snes.stretch">Stretch to fill screen.</a><ul><li><b>0</b> - Disabled<br></li><br><li><b>full</b> - Full<br>Full-screen stretch, disregarding aspect ratio.</li><br><li><b>aspect</b> - Aspect Preserve<br>Full-screen stretch as far as the aspect ratio(in this sense, the equivalent xscalefs == yscalefs) can be maintained.</li><br><li><b>aspect_int</b> - Aspect Preserve + Integer Scale<br>Full-screen stretch, same as "aspect" except that the equivalent xscalefs and yscalefs are rounded down to the nearest integer.</li><br><li><b>aspect_mult2</b> - Aspect Preserve + Integer Multiple-of-2 Scale<br>Full-screen stretch, same as "aspect_int", but rounds down to the nearest multiple of 2.</li></ul></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.tblur</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.tblur">Enable video temporal blur(50/50 previous/current frame by default).</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.tblur.accum</td><td class="ColB">boolean</td><td class="ColC">0<br>1</td><td class="ColD">0</td><td class="ColE"><a name="snes.tblur.accum">Accumulate color data rather than discarding it.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.tblur.accum.amount</td><td class="ColB">real</td><td class="ColC">0 <i>through</i> 100</td><td class="ColD">50</td><td class="ColE"><a name="snes.tblur.accum.amount">Blur amount in accumulation mode, specified in percentage of accumulation buffer to mix with the current frame.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.videoip</td><td class="ColB">enum</td><td class="ColC">0<br>1<br>x<br>y</td><td class="ColD">0</td><td class="ColE"><a name="snes.videoip">Enable (bi)linear interpolation.</a><ul><li><b>0</b> - Disabled<br></li><br><li><b>1</b> - Bilinear<br></li><br><li><b>x</b> - Linear (X)<br>Interpolation only on the X axis.</li><br><li><b>y</b> - Linear (Y)<br>Interpolation only on the Y axis.</li></ul></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.xres</td><td class="ColB">integer</td><td class="ColC">0 <i>through</i> 65536</td><td class="ColD">0</td><td class="ColE"><a name="snes.xres">Full-screen horizontal resolution.</a><p>A value of "0" will cause the current desktop horizontal resolution to be used.</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.xscale</td><td class="ColB">real</td><td class="ColC">0.01 <i>through</i> 256</td><td class="ColD">4.000000</td><td class="ColE"><a name="snes.xscale">Scaling factor for the X axis in windowed mode.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.xscalefs</td><td class="ColB">real</td><td class="ColC">0.01 <i>through</i> 256</td><td class="ColD">1.000000</td><td class="ColE"><a name="snes.xscalefs">Scaling factor for the X axis in fullscreen mode.</a><p>For this setting to have any effect, the "<system>.stretch" setting must be set to "0".</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.yres</td><td class="ColB">integer</td><td class="ColC">0 <i>through</i> 65536</td><td class="ColD">0</td><td class="ColE"><a name="snes.yres">Full-screen vertical resolution.</a><p>A value of "0" will cause the current desktop vertical resolution to be used.</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowA"><td class="ColA">snes.yscale</td><td class="ColB">real</td><td class="ColC">0.01 <i>through</i> 256</td><td class="ColD">4.000000</td><td class="ColE"><a name="snes.yscale">Scaling factor for the Y axis in windowed mode.</a></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
<tr class="RowB"><td class="ColA">snes.yscalefs</td><td class="ColB">real</td><td class="ColC">0.01 <i>through</i> 256</td><td class="ColD">1.000000</td><td class="ColE"><a name="snes.yscalefs">Scaling factor for the Y axis in fullscreen mode.</a><p>For this setting to have any effect, the "<system>.stretch" setting must be set to "0".</p></td></tr><tr><td class="RowSpacer" colspan="5">&nbsp</td></tr>
</table><hr width="100%">
 </body>
</html>
